package com.yourname.menu;

import com.yourname.action.LoginAction;
import com.yourname.entity.Student;
import com.yourname.entity.Teacher;
import com.yourname.store.DataStore;

import java.util.Scanner;

public class LoginMenu {


    /**
     * 登陆菜单
     */
    public static void loginMenu(){
        while (true) {
            System.out.println("""
                    1. 学生登陆
                    2. 教师登录
                    3. 返回上一级
                    """);
            Scanner scanner = new Scanner(System.in);
            int i = scanner.nextInt();
            switch (i) {
                case 1 -> {
                    LoginAction.studentLogin();

                }
                case 2 -> {
                    LoginAction.teacherLogin();
                }
            }
            if (i==3){
                break;
            }
        }
    }
}
